home *** CD-ROM | disk | FTP | other *** search
/ Java for 3D & VRML Worlds / Java for 3d and VRML Worlds.iso / vs / browser / cpn11b1.exe / DATA.Z / entry.wrl < prev    next >
Text File  |  1996-10-29  |  6KB  |  199 lines

  1. #VRML V2.0 utf8
  2.  
  3. # Copyright(C) 1996 Sony Corporation. All rights reserved.
  4.  
  5.  
  6. Anchor {
  7.     url "main.wrl"
  8.     description "Analog Clock (displays the current time in 3D)"
  9.     children [
  10.     DEF OBJ Transform{
  11.         scale 2.0 2.0 2.0
  12.         children [
  13.         DEF CLOCK Transform{
  14.         rotation 1.0 0.0 0.0 1.57
  15.             children [
  16.             DEF BASE Transform{
  17.             translation 0.0 -0.2 0.0
  18.                 children [
  19.                 Shape{
  20.                     appearance Appearance{
  21.                         material DEF BASE_MAT Material{
  22.                             diffuseColor 0.5 0.5 0.5
  23.                             transparency  0.5
  24.                         }
  25.                     }
  26.                     geometry Cylinder { height 0.30, radius 0.52 }
  27.                 }
  28.                 Shape{
  29.                     appearance Appearance{
  30.                         material Material{
  31.                             diffuseColor 0.7 0.7 0.7
  32.                             transparency  0.5
  33.                         }
  34.                     }
  35.                     geometry Cylinder { height 0.25, radius 0.60 }
  36.                 }
  37.                ]
  38.             }
  39.             DEF 0 Transform{
  40.                 translation 0.0 0.0 -0.4
  41.                 children [
  42.                 Shape{
  43.                     appearance  Appearance{
  44.                         material Material{
  45.                             diffuseColor 1.0 1.0 1.0
  46.                             emissiveColor 0.5 1.0 0.5
  47.                         }
  48.                     }
  49.                     geometry Cylinder { height 0.02, radius 0.06 }
  50.                 }
  51.                 ]
  52.             }
  53.             DEF 3 Transform{
  54.                 translation 0.4 0.0 0.0
  55.                 children [
  56.                 Shape{
  57.                     appearance  Appearance{
  58.                         material Material{
  59.                             diffuseColor 1.0 1.0 1.0
  60.                             emissiveColor 0.5 1.0 0.5
  61.                         }
  62.                     }
  63.                     geometry Cylinder { height 0.02, radius 0.03 }
  64.                 }
  65.                 ]
  66.             }
  67.             DEF 6 Transform{
  68.                 translation 0.0 0.0 0.4
  69.                 children [
  70.                 Shape{
  71.                     appearance  Appearance{
  72.                         material Material{
  73.                             diffuseColor 1.0 1.0 1.0
  74.                             emissiveColor 0.5 1.0 0.5
  75.                         }
  76.                     }
  77.                     geometry Cylinder { height 0.02, radius 0.03 }
  78.                 }
  79.                 ]
  80.             }
  81.             DEF 9 Transform{
  82.                 translation -0.4 0.0 0.0
  83.                 children [
  84.                 Shape{
  85.                     appearance  Appearance{
  86.                         material Material{
  87.                             diffuseColor 1.0 1.0 1.0
  88.                             emissiveColor 0.5 1.0 0.5
  89.                         }
  90.                     }
  91.                     geometry Cylinder { height 0.02, radius 0.03 }
  92.                 }
  93.                 ]
  94.             }
  95.             DEF HOUR_HAND Transform{
  96.                 rotation 0.0 1.0 0.0 1.04
  97.                 children [
  98.                 Transform{
  99.                     translation 0.0 0.0 -0.15
  100.                     children [
  101.                     Shape{
  102.                         appearance  Appearance{
  103.                             material Material{
  104.                                 diffuseColor 1.0 1.0 1.0
  105.                                 emissiveColor 0.5 1.0 0.5
  106.                             }
  107.                         }
  108.                         geometry Box { size 0.06 0.01 0.35 }
  109.                     }
  110.                     ]
  111.                 }
  112.                 ]
  113.             }
  114.             DEF LONG_HAND Transform{
  115.                 rotation 0.0 1.0 0.0 -1.04
  116.                 children [
  117.                 Transform{
  118.                     translation 0.0 0.0 -0.18
  119.                     children [
  120.                     Shape{
  121.                         appearance  Appearance{
  122.                             material Material{
  123.                                 diffuseColor 1.0 1.0 1.0
  124.                                 emissiveColor 0.5 1.0 0.5
  125.                             }
  126.                         }
  127.                         geometry Box { size 0.04 0.01 0.5 }
  128.                     }
  129.                     ]
  130.                 }
  131.                 ]
  132.             }
  133.             ]
  134.         }
  135.         ]
  136.     }
  137.     ]
  138. }
  139.  
  140. DEF MINUTE_TIMER TimeSensor{
  141.     cycleInterval 5
  142.     loop TRUE
  143.     stopTime -1
  144. }
  145.  
  146. DEF HOUR_TIMER TimeSensor{
  147.     cycleInterval 60
  148.     loop TRUE
  149.     stopTime -1
  150. }
  151.  
  152. DEF MINUTE_ROT OrientationInterpolator{
  153.     key [ 0.0, 0.5 1.0 ]
  154.     keyValue [
  155.         0 1 0 0.00,
  156.         0 1 0 -3.14,
  157.         0 1 0 -6.28
  158.     ]
  159. }
  160.  
  161. DEF HOUR_ROT OrientationInterpolator{
  162.     key [ 0.0, 0.5 1.0 ]
  163.     keyValue [
  164.         0 1 0 0.00,
  165.         0 1 0 -3.14,
  166.         0 1 0 -6.28
  167.     ]
  168. }
  169.  
  170. DEF COLOR_TIMER TimeSensor{
  171.     cycleInterval 24
  172.     loop TRUE
  173.     stopTime -1
  174. }
  175.  
  176. DEF BASE_COLOR ColorInterpolator{
  177.     key [0.0, 0.15, 0.3, 0.45, 0.6, 0.75, 1.0]
  178.     keyValue [
  179.         0.8 0.3 0.3,
  180.         0.8 0.8 0.3,
  181.         0.3 0.8 0.3,
  182.         0.3 0.8 0.8,
  183.         0.3 0.3 0.8,
  184.         0.8 0.3 0.8,
  185.         0.8 0.3 0.3
  186.     ]
  187. }
  188.  
  189. ROUTE COLOR_TIMER.fraction_changed TO BASE_COLOR.set_fraction
  190. ROUTE BASE_COLOR.value_changed TO BASE_MAT.set_diffuseColor
  191.  
  192. ROUTE MINUTE_TIMER.fraction_changed TO MINUTE_ROT.set_fraction
  193. ROUTE MINUTE_ROT.value_changed TO LONG_HAND.set_rotation
  194.  
  195. ROUTE HOUR_TIMER.fraction_changed TO HOUR_ROT.set_fraction
  196. ROUTE HOUR_ROT.value_changed TO HOUR_HAND.set_rotation
  197.  
  198.  
  199.